export default function useRemoveTodo(todoRef) {
    const remove = (todo) => {
        todoRef.value.splice(todoRef.value.indexOf(todo), 1)
    }

    const removeCompleted = () => {
        todoRef.value = todoRef.value.filter(r => !r.completed)
    }
    return { remove, removeCompleted }
}